﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Configuration;

namespace Badhshala.Models
{
    public partial class AppUser
    {
        public AppUser()
        { }

        public AppUser(long userID, string firstname, string lastname, string username)
        {
            FacebookId = userID;
            LastVisited = DateTime.Now;
            FirstName = firstname;
            LastName = lastname;
            Username = username;

            SlotMachineDBEntities ctx = new SlotMachineDBEntities();
            Credits = int.Parse(ctx.Settings.First(s => s.Name == "InitialCredits").Value);
        }
    }
}